package com.qf.feign;

import com.qf.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/*
 *@Description:
 *@author:刘哥
 *@Date:86180 2022/10/10 19:32
 */
//指定被调用的服务名
@FeignClient(name = "QF-SEARCH",fallback = SearchFallBack.class)
@RequestMapping("/search")
@Component
public interface SearchFeign {
    @RequestMapping("/hello")
    public String Hello();

    @RequestMapping("/findById")
    public User findUserById(@RequestParam("id") Integer id);

    @RequestMapping("/insertUser")
    public String insertUser(@RequestBody User user);
}
